package org.jeecg.modules.meter.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.entity.meter.MeterFeeRule;

import java.util.List;

/**
 * @Description: 仪表收费项
 * @Author: jeecg-boot
 * @Date: 2020-11-20
 * @Version: V1.0
 */
public interface MeterFeeRuleMapper extends BaseMapper<MeterFeeRule> {

    List<MeterFeeRule> findPage(Page<MeterFeeRule> page, @Param("meterFeeRule") MeterFeeRule meterFeeRule);

    MeterFeeRule getByName(@Param("projectId") String projectId, @Param("feeName") String feeName);
    List<MeterFeeRule> getMeterFeeRule(@Param("projectId") String projectId);
    @SqlParser(filter = true)
    List<MeterFeeRule> findByMeterId(@Param("meterId") String meterId);
    List<MeterFeeRule> getFeeToRule(@Param("meterId") String meterId);

    List<String> queryIdByname(@Param("nameList") List<String> asList,@Param("projectId")String projectId);
    @Select("select fee_name from charge_feeitem where id = #{itemId}")
    String getFeeName(@Param("itemId") String itemId);
}
